package mysql

import "gorm.io/gorm"

// 商品表
type Goods struct {
	gorm.Model
	Title   string  `gorm:"type:varchar(50)"`
	Image   string  `gorm:"type:varchar(500)"`
	Price   float64 `gorm:"type:decimal(10,2)"`
	ClassId int64   `gorm:"type:int(11)"`
	BrandId int64   `gorm:"type:int(11)"`
}

// 分类表
type Class struct {
	gorm.Model
	Name string `gorm:"type:varchar(50)"`
}

// 品牌表
type Brand struct {
	gorm.Model
	Name string `gorm:"type:varchar(50)"`
}

type GoodsData struct {
	Goods
	ClassName string
	BrandName string
}
